﻿<!DOCTYPE HTML>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
	<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
	<link href="/css/orderList.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/jquery-1.4.2.js"></script>

</head>
<body>
<center>
<div id="top" th:insert="top.html"/>
<!-- 提示您暂时没有订单信息 -->
	<p  class="no_order_info" th:if="${showorders.size() eq 0}">您暂时没有订单信息</p>

<h5>
	<a href="/order/showorder">全部订单</a>&nbsp;&nbsp;
	<a href="/order/showorder?status=未付款">未付款</a>&nbsp;&nbsp;
	<a href="/order/showorder?status=已付款">已付款</a>&nbsp;&nbsp;
	<a href="/order/showorder?status=已发货">已发货</a>&nbsp;&nbsp;
	<a href="/order/showorder?status=未评价">未评价</a>&nbsp;&nbsp;
	<a href="/order/showorder?status=已评价">已评价</a>&nbsp;&nbsp;
	<a href="/order/showorder?status=已退款">已退款</a>&nbsp;&nbsp;
</h5>
<!-- 模版数据 -start -->
<div th:each="showorder:${showorders}">
	<div style="margin: 0 auto;width:999px;">
		<dl class="Order_information">
			<dt><h5>订单信息</h5>	</dt>
		</dl>

		<table style="width:999px;border-width:1px; border-style:groove;font-size:x-small;background:#d8d8d8;color:#333333">
			<tr>
				<th width="80" align="center" valign="middle" bgcolor="#f3f3f3">订单编号</th>
				<th width="100" height="30" align="center" valign="middle" bgcolor="#f3f3f3">商品图片</th>
				<th width="100" align="center" valign="middle" bgcolor="#f3f3f3">实付</th>
				<th width="100" align="center" valign="middle" bgcolor="#f3f3f3">下单时间</th>
				<th width="100" align="center" valign="middle" bgcolor="#f3f3f3">配送时间</th>
				<th width="300" align="center" valign="middle" bgcolor="#f3f3f3">收货人</th>
				<th width="100" align="center" valign="middle" bgcolor="#f3f3f3">订单状态</th>
				<th width="100" align="center" valign="middle" bgcolor="#f3f3f3">操作</th>
			</tr>

			<tr>
				<td align="center" valign="middle" bgcolor="#FFFFFF" th:text="${showorder.id}"> </td>
				<td align="center" valign="middle" bgcolor="#FFFFFF">
				<a th:href="'/index/flowerdetail?flowerid='+${showorder.flowerid}">
					<img th:src="'/picture/'+${showorder.pictures}" border=0></a>
				</td>
				<td align="center" valign="middle" bgcolor="#FFFFFF" th:text="${showorder.yourprice}+'*'+${showorder.num}+'='+${showorder.yourprice * showorder.num}+'元'"></td>
				<td align="center" valign="middle" bgcolor="#FFFFFF" th:text="${showorder.inputtime}"> </td>
				<td align="center" valign="middle" bgcolor="#FFFFFF" th:text="${showorder.peisongday+','+showorder.peisongtime}"></td>
				<td align="center" valign="middle" bgcolor="#FFFFFF">
					<span th:text="${showorder.sname}+','+${showorder.mobile}+','+${showorder.address}"/>
					<div  th:if="${showorder.status eq '已付款' or showorder.status eq '未付款'}">
						<a th:href="'/order/uodateCust?id='+${showorder.id}">修改地址</a>
					</div>
				</td>
				<td align="center" valign="middle" bgcolor="#FFFFFF" th:text="${showorder.status}"> </td>
				<td align="center" valign="middle" bgcolor="#FFFFFF">
					<div th:if="${showorder.status eq '未付款'}">

						&nbsp;
				 		<a th:href="'/order/pay?id='+${showorder.id}">
					 		<img src="/image/zx.jpg" width="59" height="19">
						</a>
						<br/><br/>
						<a th:href="'/order/delorder?id='+${showorder.id}" th:attr="id=${showorder.id}">
							<img src="/image/sc.jpg" width="49" height="15"/>
						</a>

					</div>
					<div  th:if="${showorder.status eq '已付款'}">
						正在拣货<br/>
						<a th:href="'/order/refund?id='+${showorder.id}">申请退款</a>
					</div>
					
					<div  th:if="${showorder.status eq '已发货'}">
						<a th:href="'/order/updateOrder?id='+${showorder.id}">确认收货</a>
					</div>
					<div th:if="${showorder.status eq '未评价'}">
						<a th:href="'/order/evaluate?id='+${showorder.id}">评价</a>
					</div>
					<div th:if="${showorder.status eq '已评价'}">
						已评价
					</div>
					<div  th:if="${showorder.status eq '已退款'}">
						<a th:href="'/order/delorder?id='+${showorder.id}" th:attr="id=${showorder.id}">
							<img src="/image/sc.jpg" width="49" height="15"/>
						</a>
					</div>
				</td>
			</tr>

		</table>
	</div>

</div>
	<!-- 模版数据 -end -->
	<div id="customer-panel">
		<div id="select-consignee" class="order-bar">
			<div class="bar-title">
				<span>收货人信息</span>
				<a href="javascript:ConsigneeOper('member','add')">新增收货人+</a>
			</div>
			<div th:each="customer:${customers}">
				<input type="hidden" name="custID" th:value="${customer.custId}">

				<div th:id="'scn'+${customer.custId}" class="bar-info">
					<div th:if="${customer.cdefault}=='1'">
						<div class="selected select-name" onclick="Select(this)" th:text="${customer.sname}"></div>
						<span class="custID" id="selectedcustID" th:text="${customer.custId}" style="display:none;"></span>
						<span class="name" id="selectedname" th:text="${customer.sname}" style="display:none;"></span>
						<span class="address" id="selectedaddress" th:text="${customer.address}"></span>
						<span class="phone" id="selectedphone" th:text="${customer.mobile}"></span>
						<span class="default-address">默认地址</span>
						<a class="edit" th:href="'javascript:editCustomer('+${customer.custId}+')'">编辑</a>
					</div>
					<div th:if="${customer.cdefault}=='0'">
						<div class="select select-name" onclick="Select(this)" th:text="${customer.sname}"></div>
						<span class="custID" id="selectcustID" th:text="${customer.custId}" style="display:none;"></span>
						<span class="name" id="selectname" th:text="${customer.sname}"></span>
						<span class="address" id="selectaddress" th:text="${customer.address}"></span>
						<span class="phone" id="selectphone" th:text="${customer.mobile}"></span>
						<a class="edit" th:href="'javascript:deleteCustomer('+${customer.custId}+')'">删除</a>
						<a class="edit" th:href="'javascript:editCustomer('+${customer.custId}+')'">编辑</a>

						<a class="edit" th:href="'javascript:setDefault('+${customer.custId}+')'">设为默认</a>
					</div>
				</div>
			</div><!-- each结束-->
		</div>
	</div>
	</center>
</body>
</html>